package com.hjy.demo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@TableName( "sys_role")
@Data
public class Role implements Serializable {
    @TableId(type=IdType.AUTO)
    private Long roleId;
    private String roleName;
    private String roleDesc;
    private Integer roleFlag;
    @TableField(exist = false)
    private List<User> users = new ArrayList<>();

    public Role(){}

    public Role(String roleName, String roleDesc, Integer roleFlag) {
        this.roleName = roleName;
        this.roleDesc = roleDesc;
        this.roleFlag = roleFlag;
    }

}
